#!/usr/bin/perl -w

use SOAP::Lite;

$soap_response = SOAP::Lite
   -> uri('urn:flight')
   -> proxy('http://homepages.feis.herts.ac.uk/~3com0109/cgi-bin/flights.cgi')
   -> on_fault(  sub {
                         my($soap, $res) = @_;
                         warn "SOAP Error (): " ,
                              ref $res
                                ? "fs: ".$res->faultstring . ', fc: '.$res->faultcode . ', fd: '. $res->faultdetail
                                : "tr: ".$soap->transport->status;
                         return 0;
                 })
   ->checkSeatAvailability('EJ286', '03/10/2008');
  $result = $soap_response->result;
  print $result;
